Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename schema to valueSchema #1482

Merged
merged 9 commits into from
Sep 15, 2023
Merged

feat: rename schema to valueSchema #1482

merged 9 commits into from
Sep 15, 2023

Conversation

alvrs
Copy link
Member

@alvrs alvrs commented Sep 14, 2023

Fixes #1129

@changeset-bot
Copy link

changeset-bot bot commented Sep 14, 2023

🦋 Changeset detected

Latest commit: 449bde4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@latticexyz/cli Major
@latticexyz/protocol-parser Major
@latticexyz/store-sync Major
@latticexyz/store Major
create-mud Major
@latticexyz/dev-tools Major
@latticexyz/store-indexer Major
@latticexyz/react Major
@latticexyz/world Major
@latticexyz/abi-ts Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
@latticexyz/ecs-browser Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/utils Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

dk1a
dk1a previously approved these changes Sep 14, 2023
holic
holic previously approved these changes Sep 14, 2023
@alvrs
Copy link
Member Author

alvrs commented Sep 14, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@alvrs alvrs force-pushed the alvrs/rename-value-schema branch from 4189c86 to 14582af Compare September 14, 2023 20:50
@@ -127,7 +127,6 @@ The client package will vary depending on which template used (vanilla, react, p

- You can adjust `createClientComponents.ts` to either override contract components or add client-only components.
- If you are using chains other than foundry/anvil and lattice testnet, you can add them in `getNetworkConfig.ts`
- `createSystemCalls` represents how the client talks to the system contracts via our `worldSend` helper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw we still have and use createSystemCalls, we just go through worldContract.write instead

@@ -45,7 +45,7 @@ For the sake of simplicity, we will implement this in the `increment` function r
A MUD table has two schemas:

- `keySchema`, the key used to find entries
- `schema`, the value in the entry (soon to be renamed to `valueSchema`)
- `valueSchema`, the value in the entry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

keySchema?: Record<string, KeySchema<StaticUserTypes>>;
/** Table's column names mapped to their types. Table name's 1st letter should be lowercase. */
schema: SchemaConfig<UserTypes>;
/** Table's field names mapped to their types. Table name's 1st letter should be lowercase. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the second sentence here is weird, should this be "field name's first letter"?

// to store, while `getField` loads it from storage. Remove this once we have support for passing the
// schema in `getField` too. (See https://github.com/latticexyz/mud/issues/444)
// valueSchema in `getField` too. (See https://github.com/latticexyz/mud/issues/444)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think getField now supports passing in value schema (or field layout now) so is this comment/workaround still relevant?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, will remove this in a followup

@alvrs alvrs merged commit 07dd6f3 into main Sep 15, 2023
@alvrs alvrs deleted the alvrs/rename-value-schema branch September 15, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename schema to valueSchema (to make it consistent with keySchema)
3 participants